Dragster is a test tool for Drag Manager v1.0. It test all of the API calls and is intended for compatibility testing with future versions.
System Requirements
System 7.0, 7.0.1 or 7.1 (System 7.1 preferred), 2.5mb RAM, Dragging Extension 1.0
FEATURE LIST:
1) Drag and Drop of the four data types: TEXT, PICT, snd, MooV.
• Note: drag and drop of movies is supported within Dragster, but not to the Finder.
2) Supports opening, closing, editing, saving, printing of text, pict and movie files.
3) Clipboard window support for 3 data types : TEXT, PICT, MooV.
4) Supports Drag and Drop of clipping files: text, pict, sound
5) Covers testing all the API calls.
DRAGGING DATA:
TEXT : To drag text from a text document, mousedown in the left side margin or top margin and start dragging. This feature does NOT follow the Human Interface Specification of the Drag Manager. Its purpose is only within the context of the test tool.
PICT : Just drag anywhere inside the content region of the document.
MooV : Just drag anywhere inside the content region of the document.
Sound : Mousedown on the speaker icon and proceed to drag.
Clippings : Drag any of the above data types (except movies) to the Finder and untitled clippings will be made. You can then drag the clippings back into Dragster or view them from the Finder.
PREFERENCES
The preferences window displays attributes stored to a file in the Preferences folder.
• Drag Support - check this and dragging will be supported.
• Default Handler at Launch - check this and Dragster will install its default drag
handler when first launched.
• Movie Dragging - check this and movies can be dragged, otherwise movies would
have regular controllers and cannot be dragged.
• Show Handler Window - check this and each doc created will show its available
drag handlers in a list for viewing, installing and removing.
• Log Window at Launch - Open the log window when Dragster first launches.
• Event messages - Check this and Dragster will record events to the log window.
• Menu commands - Check this and Dragster will record specific menu commands.
• Sound On/Off - This allows sound feedback when dragging on and off windows.
• High Level/Low Level - This determines the nature of the error messages,
whether more low level info is required or just simple error alerts.
• File Name - Change this name so the log file opens and saves by a specific name.
• Log File - Check this and log file support is activated, otherwise this utility
cannot be used.
• Apply - Click this button and the current preference settings are now understood
by Dragster. Just changing the controls and saving the Preferences to file does
not have an immediate effect. Also, you can save the preferences, quit and
re-launch.
UTILITIES MENU
System Info Window - A window indicating the system version, the Drag Manager version and its info flags, and QuickTime™ versions.
Log File - Dragster can store any event and/or data from memory to a log window and automatically save it to file. The preferences dialog indicates the file name the program will use. Be careful, when opening and closing the log file, Dragster clears out the old text and starts with an empty file.
TESTS MENU
Heap Scramble - You can scramble both the application and system heaps. This is intended for testing the Drag Manager when memory is constantly being moved. Good for stress testing.
Show Drag Handers - Each document contains a twin window which lists all its associated drag handlers. Select this option to open the window. It will automatically close when the document window closes. The title would be "<xxx Handlers>" for document "xxx" to avoid confusion. You can remove or add the installed handlers from the list.
Install Default Handler - if you want Dragster to have its own default drag handler, select this option. If it already has one, an alert will appear.
Remove Default Handler - if you want Dragster to remove its own handlers (the default), select this option. If it does not have any, an alert will appear.
No Window Handlers - this option forces Dragster NOT to install handlers to any document created or opened This is to see how documents react if their window handler does not get installed upon open. No dragging should occur.
Zoom Animation - this opens a test dialog to verify zoom animation. You can determine the acceleration, stepping, and shape of the animation.
Use AutoScroll Hilighting - if this option is checked, text edit windows will scroll its text automatically while calling DragPreScroll() and DragPostScroll(). It is an auto function and all you need to do is click in the left and top margins of the window.
Use DragInputProc -
This enables the document's input procedure to override the Drag Manager's. When selected, the next drag will occur and the drag item will accellerate away from the current mouse position.
Use DragDrawingProc -
This enables the document's drawing procedure to override the Drag Manager's. When selected, the next drag will occur with a solid back line as the drag outline, as opposed to the dotted gray.
Use SendDataProc -
This enables the document's sendData procedure to work on the next drag. When selected, the next drag will occur but the drag data will be deferred until the destination document requests it.
Use TEGetHiliteRgn -
Select this item if you want your text selection to be outlined with a solid black outline.
Use UpdateDragHilite -
This routine forces an update to the document's content region thus allowing UpdateDragHilite() to be called to redraw the hilite frame. For text documents, the result is the whole window blanks out and the frame redraws.
Use DragSetMouse -
Use this to output the current mouse location during a drag. This info gets dumped to the log window only.
Use Data Offset-
This feature works only for text data. When dragging text, Dragster will send only the first three words of the text. This tests using offsets to retrieve the dragged text data.
ShowDragHilite -
To change the hilite feature, select either inside, outside menu items to draw the frame hilite inside or outside the target area. This option works best with sound documents.
Special Drag Outline -
Use this feature to alter the appearance of the drag outline by making it solid gray.
Clear Drag Procedures
This features calls the Drag Manager to clear the drag handlers of a given document.
Report TrackDrag() -
This enables TrackDrag() to report any kind of error that occurred. This can be annoying at times so I made this feature.
Attempt To Translate -
This feature will force the Drag Manager to translate the data once received, thus using Macintosh Easy Open to get the right data format. It adds 'rtf ' and 'text' as data flavors.
Request Native Flavor -
This feature accesses the drag data only according to its real, intended data type. For example, a text document will request drag data by 'TEXT', picture docs by 'PICT' and so on.
Use AEDescriptor-
Select this item if you want to send AppleEvent descriptor data during a drag.
Send Custom File-
This feature, when dragging some data to the Finder sends a custom file type rather than a clipping. This file type is a text file.
ERRORS MENU
This menu forces the passing of bad parameters into the calls listed in this menu. The calls may be Dragster's callback routines or those of the Drag Manager.
DragTrackingHandler -
This forces the document's tracking handler to report -1 as the OSErr result, thus crippling this functionality.
ReceiveDropHandler -
This forces the document's receive data handler to report -1 as the OSErr result, thus crippling this functionality.
Dispose Drag Twice -
This feature will attempt to dispose of the DragReference of a given drag twice.
badDragRefErr -
For all the Drag Manager API calls that return 'badDragRefErr', this hierarchical menu allows us to force a bad DragReference parameter to each call. The result will be an error alert with the appropriate error number.
badDragItemErr -
For all the Drag Manager API calls that return 'badDragItemErr', this hierarchical menu allows us to force a bad ItemReference parameter to each call. The result will be an error alert with the appropriate error number.
paramErr -
For all the Drag Manager API calls that return 'paramErr', this hierarchical menu allows us to force a parameter error to each call. The result will be an error alert with the appropriate error number.
handlerNotFoundErr -
For all the Drag Manager API calls that return 'handlerNotFoundErr', this hierarchical menu allows us to force unknown handlers to each call. The result will be an error alert with the appropriate error number.
cantGetFlavorErr -
For all the Drag Manager API calls that return 'cantGetFlavorErr', this hierarchical menu allows us to force a parameter error to each call. The result will be an error alert with the appropriate error number.
badDragFlavorErr -
This feature is for adding a bad or unknown flavor type to a given drag. The call SetDragItemFlavorData() is used twice, first installing TEXT as the first flavor, then another flavor type to the same drag item. An error alert will then appear.
duplicateFlavorErr -
For all the Drag Manager API calls that return 'duplicateFlavorErr', this feature allows us to force adding flavor types that are aleady installed to a given drag. The result will be an error alert with the appropriate error number. When Dragster opens the SFGetFile() dialog, select any file type you want, then an error alert will appear.
BOUNDARY MENU
This menu has routines used for boundary and stress testing.
QuickDraw Stress-
Select this item when dragging PICTs from one pict window to another. When dragging onto a window, CopyBits calls are made. An intricate drag outline is also made, thus stressing QuickDraw.
Use Event Manager-
Use this item to make WaitNextEvent() or GetNextEvent() or ModalDialog() calls during a drag. This item was designed as a test case for the Event Manager.